#! /bin/bash

jpp () {
  E_NOFILE=61
  read line <<< "$(ls -t *.{C,cc,cxx,cpp} 2>/dev/null)" 
  
  if [ ! -z  $line ]
  then 
       g++ -g -ggdb $line -o a.out
  else
       echo "No C++ sourse file" 1>&2
       exit $E_NOFILE
  fi
}

jpp
